package com.qf.test;

import com.qf.pojo.User;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * projectName: Spring
 *
 * @author: MaTianWei
 * time: 2021/6/28 22:46
 * description:
 */

public class Demo2 {
    @Test
    public void Test1(){
        ApplicationContext ac = new ClassPathXmlApplicationContext("classpath:applicationContext.xml");

        User user = (User) ac.getBean("user");

        System.out.println(user);
    }
}
